#pragma once
#include <glad/glad.h>
#include<string>
#include<fstream>
#include<sstream>
#include<iostream>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

class Shader {
public:
	unsigned int ID;

	Shader(const GLchar* vertexPath, const GLchar* fragmentPath);
	void use();
	void setBool(const std::string &name,bool value) const;
	void setInt(const std::string &name,int value) const;
	void setFloat(const std::string &name, float value) const;
	void set4f(const std::string &name, float v0, float v1, float v2, float v3);
	void setMatrix4fv(const std::string &name, glm::mat4 &matrix) const;
private:
	void checkCompileErrors(unsigned int shader, std::string type);
};